﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DcsGauges.DataStructures;
using DcsGauges.Gui.Gauges.ValueConverters;
using DcsGauges.Gui.Rendering;
using DcsGauges.Shared.DataStructures;
using Microsoft.Xna.Framework;

namespace DcsGauges.Gui.Gauges.Concrete
{
    class EngineRpmGauge : CircularGaugeWithSubRotator
    {
        public EngineRpmGauge(GuiRenderableBase parent, URect area, DcsProperty rpmUnitProperty, DcsProperty rpmTenthProperty) : base(parent,
            area,
            rpmUnitProperty,
            rpmTenthProperty,
            new LinearConverter(new InOutMapping(0.0f, MathEx.Deg2Rad(4.0f)), new InOutMapping(1.0f, MathEx.Deg2Rad(270.0f))),
            new LinearConverter(new InOutMapping(0.0f, MathEx.Deg2Rad(0.0f)), new InOutMapping(1.0f, MathEx.Deg2Rad(360.0f))),
            TextureManager.GetTexture("Textures/Gauges/Needles/EngineGaugesSub"),
            TextureManager.GetTexture("Textures/Gauges/Backgrounds/EngineRpm"), 
            TextureManager.GetTexture("Textures/Gauges/Needles/EngineGaugesNeedle"), 
            URect.CalcFromCenter(new Vector2(118.0f / 328.0f, 102.0f / 328.0f), new Vector2(0.25f, 0.25f)))
        {

        }
    }
}
